

#include <Inklude/ikCNetClientFactory.h>
#include <Windows.h>

using namespace Inklude;

int main(int argc, char* argv[])
{   
    // Create tcp async instance via factory class
    std::shared_ptr<ikINetClient> pClient = ikCNetClientFactory::CreateClient(Inklude::NET_OPTION::TCP_SYNC);

    // The port number you put in here becomes the port a remote host can access.
    pClient->Initialize(9999);
    char *buffer = new char[6000];

    while (true)
    {
        // Recevie the data as much as you want.
        // This is TCP
        if (pClient->Receive(buffer, 6000) == 6000)
        {
            printf(buffer);
        }
    }

	return 0;
}
